import request from '@/utils/request'

// 查询生产团队列表
export function listTeam(query) {
  return request({
    url: '/sm/team/list',
    method: 'get',
    params: query
  })
}

// 查询生产团队详细
export function getTeam(teamId) {
  return request({
    url: '/sm/team/' + teamId,
    method: 'get'
  })
}

// 新增生产团队
export function addTeam(data) {
  return request({
    url: '/sm/team',
    method: 'post',
    data: data
  })
}

// 修改生产团队
export function updateTeam(data) {
  return request({
    url: '/sm/team',
    method: 'put',
    data: data
  })
}

// 删除生产团队
export function delTeam(teamId) {
  return request({
    url: '/sm/team/' + teamId,
    method: 'delete'
  })
}

// // 查询团队成员列表
// export function listMember(query) {
//   return request({
//     url: '/sm/member/list',
//     method: 'get',
//     params: query
//   })
// }


// 所属车间不分页
export function listWorkshop(query) {
  return request({
    url: '/bdm/line/workshop/getlist',
    method: 'get',
    params: query
})
}
// 生产线不分页
export function listLine(query) {
  return request({
    url: '/pm/plan/line/getlist',
    method: 'get',
    params: query
  })
}
// 组长不分页
// 先去member拿userId,再去sys_user拿用户名称
export function listLeader(query) {
  return request({
    url: '/sm/team/leader/getlist',
    method: 'get',
    params: query
  })
}
